<?
	function check_config($config_name) {
		$config = file($config_name);
		$config_length = count($config);
		for ($k=1;$k<=$config_length;$k++) {			$line = trim($config[$k]);
			if ((($k==0)&&($line=="<?"))||(($k==$config_length-1)&&($line=="?>"))) continue;
			if ((empty($line))||(strpos($line,"//") === 0)) {				$config[$k] = "1";
				continue;
			}			if (preg_match('/^\$[A-Za-z_0-9]+ = "[^"]*";[ ]*\/{2,}.*$/i',$line)) $config[$k] = "1";
			if (preg_match('/^\$[A-Za-z_0-9]+ = "[^"]*";$/i',$line)) $config[$k] = "1";

			if ($config[$k] !== "1") die("Ошибка в конфиге ".$config_name." в строке #".++$k.": ".$line);
		}
	}
	// подгрузка основного конфига
	include ('user/config.php');
	// подгрузка товаров и прочей фигни
	include ('user/category.php');
	include ('user/tovar.php');
	include ('user/section.php');

	$current_category = $_GET['category'];
	if (empty($current_category)) $is_global = true; else $is_global = false;
//<!-- DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd" -->
//<!-- DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd" -->
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"[]>
<html lang="ru-RU">
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title><?=strip_tags($site_title)?></title>

    <link rel="stylesheet" href="/core/reset.css" type="text/css" media="screen" />
    <link rel="stylesheet" href="/core/style.css" type="text/css" media="screen" />
    <!--[if IE 6]><link rel="stylesheet" href="/core/style.ie6.css" type="text/css" media="screen" /><![endif]-->
    <!--[if IE 7]><link rel="stylesheet" href="/core/style.ie7.css" type="text/css" media="screen" /><![endif]-->

    <script type="text/javascript" src="/core/script.js"></script>
    <script type="text/javascript" src="/core/adds.js"></script>
    <script type="text/javascript" src="/core/aj_func.js"></script>
	<script type="text/javascript" src="/core/jquery.js"></script>
	<script type="text/javascript" src="/core/fancybox/jquery.fancybox-1.3.4.pack.js"></script>
   <style type="text/css">
.art-post .layout-item-0 { padding-right: 10px;padding-left: 10px; }
   .ie7 .art-post .art-layout-cell {border:none !important; padding:0 !important; }
   .ie6 .art-post .art-layout-cell {border:none !important; padding:0 !important; }
   </style>
   <link rel="stylesheet" href="/core/fancybox/jquery.fancybox-1.3.4.css" type="text/css" media="screen" />
   <link rel="stylesheet" href="/user/user.css" type="text/css" media="screen" />
   <script>
   		$(document).ready(function() {
			timer(<?=$adv_time?>);
			$("a#inline_response").fancybox();
			$("a#inline_call").fancybox();
			$("a#inline_call2").fancybox();
			$("a#inline1").fancybox();
			$("a#inline2").fancybox();
			$("a#prod_img").fancybox({				'titlePosition'	: 'inside',
				'transitionIn'	: 'elastic',
				'transitionOut'	: 'elastic'
			});
		});

		function make_request(form_id) {			args = form2get(form_id);
			ajaxRequest("/core/make_request.php",args,request_result);		}

		var request_result = function(oXML) {			result = oXML.responseText;
			alert(result);
			$.fancybox.close();
		}
   </script>
<? // место для Яндекс.Метрики
	echo str_replace("&quot;",'"',$metrika);
?>
</head>
<body style="background-color: <?=$background_color?>;
				background-image: url('<?=$background_img?>');
				background-repeat: <?=$background_repeat?>;<?=$background_repeat=='no-repeat'?'background-size:cover;':''?>">
<div id="art-main">
    <div class="cleared reset-box"></div>
    <div class="art-box art-sheet">
        <div class="art-box-body art-sheet-body">
<? // заголовок
	include ('core/header.php');
?>
            <div class="cleared reset-box"></div>
            <div class="art-layout-wrapper">
                <div class="art-content-layout">
                    <div class="art-content-layout-row">
                        <div class="art-layout-cell art-content">
<? // акция
	include ('core/advert.php');
?>

<?
 // товар, либо доставка
	if (empty($_GET['section'])) {
		include ('core/product.php');
	} else {		include ('user/sections/sect'.$_GET['section'].'.php');
	}
?>

                          <div class="cleared"></div>
                        </div>
                        <div class="art-layout-cell art-sidebar1">
<? // гарантия
	include ('core/garant.php');
?>

<? // каталог
	if (!empty($category_all_name)) include ('core/catalog.php');
?>

<? // блок с доставкой
	include ('core/section_cfg.php');
?>

<? // отзывы
	include ('core/response_block.php');
?>

                          <div class="cleared"></div>
                        </div>
                    </div>
                </div>
            </div>
            <div class="cleared"></div>
<? // нижняя часть
	include ('core/footer.php');
?>
    		<div class="cleared"></div>
        </div>
    </div>
    <div class="cleared"></div>
    <p class="art-page-footer">
© 2012. Все права защищены. При копировании материалов ссылка на сайт обязательна.<br />Создание сайта - <a href="http://fast-shop5.ru">fast-shop5.ru</a>
    </p>
    <div class="cleared"></div>
</div>

<? // формы обратной связи
	include ('user/form.php');
?>
</body>
</html>
<?
	// VERSION: 2.2A
?>
